1. Field of the Invention
The present invention relates generally to graphics systems, and more particularly to texture filtering for 3D graphics with screen pixel digitization at variable sampling rates.
2. Description of the Background Art
A texture is a digital image, typically rectangular in shape, having a (u, v) coordinate space. The smallest addressable unit of a texture is a texel, which is located at a particular coordinate in the (u, v) coordinate system. In a texture mapping operation, a texture is mapped to the surface of a graphical model as the model is rendered to create a destination image. In the destination image, pixels are located at particular coordinates in the (x, y) coordinate system.
In texture mapping, data is sampled from the texture to compute an intensity value for a pixel in the destination image. The sampled texels for a given pixel are typically identified by mapping a point in the destination image into the texture. Texels neighboring the mapped point in the texture are then sampled, weighted, and summed to compute the intensity value for a pixel. The process is then repeated for additional pixels in the destination image.
Various texture reconstruction filtering techniques may be used to reduce blocky appearance and aliasing noise in textures while applying perspective effects to produce a smoother and more realistic destination image. Such texture filtering techniques include box filtering (point sampling or any box filter), bilinear filtering, trilinear filtering, and anisotropic filtering.
Filtering with the box filter (point sampling) technique is the most basic method for texture mapping and determining the attributes, such as color, of a pixel from the texture maps. Point sampling uses the nearest texel value mapped to a particular pixel to determine the pixel attribute. For example, assume that a given pixel location at coordinates (x, y) is mapped to particular texture coordinates (u, v). The texture coordinates (u, v) may include fractional values. However, in point sampling, the texture coordinate assigned to the pixel will be the nearest integer value. Thus, if a given pixel is mapped to texture coordinates (u, v)=(1.2, 1.9), the point sampling technique will assign a texel with texture coordinates (u′, v′) to the given pixel with the texture coordinates (u′, v′) being based on the nearest integer value: (u′, v′)=(1, 2).
Bilinear filtering involves interpolating the attribute values of four surrounding discrete texels to calculate the attribute value of a new texel which is then assigned to a particular pixel. The process is then repeated for each pixel forming the object being textured. The bilinear filtering technique provides reasonably realistic images and improved image quality over the point sampling filtering technique.
Trilinear filtering involves the use of multiple texture maps or MIP maps at various levels of depth. Bilinear filtering is preformed in each MIP map level, resulting in a new texel for each MIP map level. The actual attribute value for a pixel is then determined by performing another interpolation step between the two new texels associated with two particular MIP map levels, resulting in an interpolation process in three dimensions.
Anisotropic filtering involves taking samples of texels in the texture with the samples chosen according to the shape of the pixel “footprint” in the texture space. Thus, the shape of the region of the texels that are sampled varies as circumstances dictate.
These various texture-filtering algorithms do not address the problem of variable sampling rate or other non-standard graphics processes. When sections of a scene are sampled at varying sampling rates, it is desirable to appropriately modify the characteristics of the texture filter. Otherwise, the effective filter characteristics will not be consistent over the entire scene, resulting in undesirable artifacts.
Further, when a scene is super-sampled, a convolution is effectively performed for the post-filter and the texture reconstruction filter. The characteristics of the resulting higher-order filter typically matches the characteristics of a filter used for coarse sampling. Without this matching of filter characteristics, banding will occur in the image due to the additional filtering applied to aggregate dense samples resulting in different passbands in the areas with the different sampling rates.
Additionally, in conventional systems, the texture-filtering model is typically pre-specified in each particular application. Conventional systems do not provide a texture filter that varies the filter characteristics in response to, for example, the rate of sampling and the extent of texture warping. Such deficiencies of conventional systems lead to images that are generated with undesirable artifacts. Therefore, there is a need for a matched texture filter design for varying sample rates.